package StudyCode.summary.mydatetime;

import java.time.LocalDate;
import java.util.Calendar;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetCalendarLeftDayOfYear {
	public static void main(String[] args) {
		Calendar calendar = Calendar.getInstance();
		LocalDate localDate = LocalDate.ofYearDay(calendar.get(Calendar.YEAR), 1);
		int dayCount = localDate.isLeapYear() ? 366 : 365;
		System.out.println(calendar.get(Calendar.YEAR) + "年还有" + (dayCount - calendar.get(Calendar.DAY_OF_YEAR)) + "天");
	}
}
